POV-Ray : Newsgroups : povray.general : Trace(): help required : Re: Trace(): help required Server Time
1 Aug 2024 02:18:31 EDT (-0400)
  Re: Trace(): help required  
From: Mr Seb
Date: 18 May 2006 16:20:47
Message: <446cd71f@news.povray.org>
An easy example :

you have an object, called Object...and you want to put another object at
the top of it, at the vertical of a <X,?,Z> point.
You can call it :

#declare coord=trace (Object,<X,100000,Z>,<0,-1,0>)

<X,1000,Z> is a point at the vertical of your object (take 100000 as high as
you wish, it must be higher than the heigh of your object)
<0,-1,0> is the down direction.
So Trace will shoot a ray from <X,10000,Y> downside and look if it hits your
object. If it does, it returns the intersection point. This point is the
coord where you want to put your new object.

For the 4 vectors version :
use as follows :
#declare coord=trace(Object,<X,100000,Z>,<0,-1,0>,norm)
it returns in coord the same vector than in the first example. It also
return the normal vector at this point in "norm"


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.